<!DOCTYPE html>
<html lang="zh-CN" data-theme="light">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>题库 - Feng-Bit OJ</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="/css/style.css">
    <style>
        /* 主内容区 */
        .container {
            max-width: 1200px;
            margin: 2rem auto;
            padding: 0 1rem;
        }

        /* 题目表格 */
        .question-table {
            width: 100%;
            border-collapse: collapse;
            background: var(--primary-bg);
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .question-table th {
            background: var(--primary-accent);
            color: white;
            padding: 1rem;
            text-align: left;
        }

        .question-table td {
            padding: 1rem;
            border-bottom: 1px solid var(--primary-light);
        }

        .question-table tr:hover {
            background: rgba(95, 108, 175, 0.05);
        }

        /* 难度标签 */
        .difficulty {
            display: inline-block;
            padding: 0.3rem 1rem;
            border-radius: 20px;
            font-size: 0.9em;
        }

        .difficulty.easy {
            background: rgba(76, 175, 130, 0.15);
            color: var(--success);
        }

        .difficulty.medium {
            background: rgba(255, 193, 7, 0.15);
            color: var(--warning);
        }

        .difficulty.hard {
            background: rgba(198, 40, 40, 0.15);
            color: #C62828;
        }

        .question-link {
            color: var(--link-normal);
            text-decoration: none;
            position: relative;
            transition: all 0.3s ease;
        }

        .question-link:hover {
            color: var(--link-hover);
        }

        .question-link::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 0;
            height: 2px;
            background: currentColor;
            transition: width 0.3s ease;
        }

        .question-link:hover::after {
            width: 100%;
        }

        .question-link:visited {
            color: var(--link-visited);
        }

        [data-theme="dark"] .question-table tr:hover {
            background: rgba(255, 255, 255, 0.05);
        }
    </style>
</head>

<body>
    <nav class="navbar">
        <div class="nav-links">
            <a href="/" class="nav-link">首页</a>
            <a href="/all_questions" class="nav-link">题库</a>
        </div>
        <div class="nav-right">
            <button class="theme-toggle" id="themeToggle">
                <i class="fas fa-sun"></i>
            </button>
        </div>
    </nav>

    <main class="container">
        <h1 class="page-title">编程题库</h1>
        <table class="question-table">
            <thead>
                <tr>
                    <th>#</th>
                    <th>题目名称</th>
                    <th>难度</th>
                </tr>
            </thead>
            <tbody>
                {{#question_list}}
                <tr>
                    <td>{{number}}</td>
                    <td><a href="/question/{{number}}" class="question-link">{{title}}</a></td>
                    <td><span class="difficulty easy">简单</span></td>
                </tr>
                {{/question_list}}
            </tbody>
        </table>
    </main>

    <script src="/js/app.js"></script>
</body>

</html>